﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- PokeIn Connection Request -->
    <script type="text/javascript" src="PokeIn.ashx?ms=connect"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
                <div style='font: normal normal 12px sans-serif,Arial; color: Black;' id='zone'></div>
                <script>
                    //below event fires when PokeIn client side files loaded
                    document.OnPokeInReady = function () {
                        //Begin!
                        PokeIn.Start(function (is_started) {
                            if (is_started) {
                                document.title = "PokeIn is Connected";
                            }
                        });

                        //OnClose event which fires when this client disconnects from server
                        PokeIn.OnClose = function () {
                            if (!PokeIn.PageUnloading) {
                                document.title = "Reconnecting..";
                                PokeIn.ReConnect();
                            }
                        };
                    };

                    var elm = document.getElementById('zone');
                    function UpdateTime(tm) {
                        elm.innerHTML += tm.toLocaleString();
                    };
                </script>
        </div>
    </form>
</body>
</html>
